import React, { Component } from 'react'
import TwsLayout from './component/tws-layout'
import { connect } from 'react-redux'

import * as url from './constant/constant-url'
import OnlineCodingDetailPageBody from './component/online-coding-detail-page-body'
import TutorAssignmentPageBody from './component/tutor-assignment-page-body'
import ExcellentAssignmentPageBody from './component/excellent-assignment-page-body'
// import PreviewAssignmentPageBody from './component/preview-assignment-page-body'
import TutorAnswerPageBody from './component/tutor-answer-page-body'
import StudentAnswerPageBody from './component/student-answer-page-body'
// import PreviewAnswerPageBody from './component/preview-answer-page-body'
// import PreviewExcellentAssignmentVideoPageBody from './component/preview-excellent-assignment-video-page-body'
import StudentExcellentAssignmentVideoPageBody from './component/student-excellent-assignment-video-page-body'
import TutorExcellentAssignmentVideoPageBody from './component/tutor-excellent-assignment-video-page-body'

import {
  HashRouter as Router,
  Route
} from 'react-router-dom'

class App extends Component {
  render () {
    return (
      <Router>
        <TwsLayout>
          <Route exact path='/' component={OnlineCodingDetailPageBody} />
          <Route exact path={url.studentAssignmentPageBodyUrl} component={OnlineCodingDetailPageBody} />
          <Route exact path={url.tutorAssignmentPageBodyUrl} component={TutorAssignmentPageBody} />
          <Route exact path={url.tutorAssignmentPageBodyDividerUrl} component={TutorAssignmentPageBody} />
          {/* <Route path={url.previewAssignmentPageBodyUrl} component={PreviewAssignmentPageBody} /> */}

          <Route path={url.excellentAssignmentPageBody} component={ExcellentAssignmentPageBody} />

          {/* <Route path={url.previewExcellentAssignmentVideoPageBodyUrl} component={PreviewExcellentAssignmentVideoPageBody} /> */}
          <Route path={url.studentExcellentAssignmentVideoUrl} component={StudentExcellentAssignmentVideoPageBody} />
          <Route path={url.tutorExcellentAssignmentVideoUrl} component={TutorExcellentAssignmentVideoPageBody} />

          <Route path={url.studentAnswerPageUrl} component={StudentAnswerPageBody} />
          <Route path={url.tutorAnswerPageUrl} component={TutorAnswerPageBody} />
          {/* <Route path={url.previewAnswerPageUrl} component={PreviewAnswerPageBody} /> */}
        </TwsLayout>
      </Router>
    )
  }
}

const mapStateToProps = ({lang}) => ({lang})

export default connect(mapStateToProps)(App)
